{extend name="../app/index/view/layout/main.html" /}
//网站标题
{block name="title"}<title>设置 - {$meta.appname}</title>{/block}

//css资源
{block name="link"}
<!-- 第三方库css -->
<link rel="stylesheet" href="__STATIC__/lib/layui/css/layui.css">
<link rel="stylesheet" href="__STATIC__/lib/swiper/css/swiper.css">

<!-- 自定义css -->
<link rel="stylesheet" href="__INDEX_STATIC__/css/common.css">
<link rel="stylesheet" href="__INDEX_STATIC__/css/app.css">
<style>
  .footer{
    position: fixed;
    bottom: 0;
    width: 100%;
  }
</style>
{/block}

//js资源
{block name="script"}
<script src="__STATIC__/lib/layui/layui.js"></script>
<script src="__INDEX_STATIC__/js/config.js"></script>
<script>
    'use strict';
    layui.use(['layer', 'jquery', 'nav'], function(){
        let layer = layui.layer
            ,$ = layui.jquery;
    });
</script>
{/block}

//body
{block name="body"}
<!-- body -->
<section class="body top-25">
  <div class="layui-container">
    <div class="layui-row layui-col-space20">
      <div class="layui-col-md3">
        {include file="user/nav" curr="setting" /}
      </div>
      <div class="layui-col-md9">
        <div class=" block">
          <div class="block-header flex-def flex-zBetween">
            <h2>基本信息</h2>
          </div>
          <div class="setting">
            <table class="layui-table">
              <colgroup>
                <col width="200">
                <col>
              </colgroup>
              <thead>
              </thead>
              <tbody>
              <tr>
                <td>头像</td>
                <td><img width="100" height="100" src="{$user.avatarUrl}" alt="{$user.username}"></td>
              </tr>
              <tr>
                <td>用户名</td>
                <td>{$user.username}</td>
              </tr>
              <tr>
                <td>邮箱</td>
                <td>{$user.email}</td>
              </tr>
              <tr>
                <td>昵称</td>
                <td>{$user.nickname}</td>
              </tr>
              <tr>
                <td>绑定手机</td>
                <td>{$user.mobile ?: '-'}</td>
              </tr>
              <tr>
                <td>最后登录时间</td>
                <td>{$user.last_time | absoluteTime}</td>
              </tr>
              <tr>
                <td>注册时间</td>
                <td>{$user.create_time}</td>
              </tr>

              </tbody>
            </table>
          </div>
        </div>
      </div>

    </div>

  </div>
</section>
{/block}